package com.travel.modules.alipay.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.travel.commons.validator.groups.AddGroup;
import com.travel.commons.validator.groups.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * null
 * @TableName order_form
 */
@Data
@TableName("order_form")
public class OrderForm implements Serializable {
    /**
     *
     */
    @TableId
    private Integer id;

    /**
     * 订单编号
     */
    @NotNull(message = "订单号不能为空", groups = UpdateGroup.class)
    private String orderId;

    /**
     * 用户id
     */
    private Integer userId;
    @TableField(exist = false)
    private String username;

    /**
     * 商家id
     */
    private Integer merchantId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 过期时间
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date expireTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 商品id
     */
    @NotBlank(message = "商品id不能为空", groups = AddGroup.class)
    private String goodsId;

    /**
     * 应付
     */
    private BigDecimal pay;

    /**
     * 实付
     */
    private BigDecimal realPay;

    /**
     * 订单类型，1-线路订单，2-酒店订单
     */
    private Integer type;

    /**
     * 成人数
     */
    private Integer adNum;

    /**
     * 儿童数
     */
    private Integer chNum;

    /**
     * 订单状态，-2-已过期，-1-已取消，0-待付款，1-已付款，2-待消费，3-待评价，4-交易关闭
     */
    private Integer status;

    /**
     * 经济间数
     */
    private Integer economyNum;

    /**
     * 单人间数
     */
    private Integer singleNum;

    /**
     * 双人间数
     */
    private Integer doubleNum;

    /**
     * 多人间数
     */
    private Integer manyNum;

    /**
     * 套房数
     */
    private Integer vipNum;

    /**
     * 线路名称
     */
    @TableField(exist = false)
    private String name;

    /**
     * 出发地
     */
    @TableField(exist = false)
    private String startAddr;

    /**
     * 目的地
     */
    @TableField(exist = false)
    private String endAddr;

    /**
     * 路线
     */
    @TableField(exist = false)
    private String route;

    @TableField(exist = false)
    private String hotelName;

    @TableField(exist = false)
    private Integer reviewId;

    @TableField(exist = false)
    private String content;

    @TableField(exist = false)
    private Integer satisfaction;

    @TableField(exist = false)
    private Date revCreateTime;


    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table order_form
     */
    private static final long serialVersionUID = 1L;
}